﻿#region itdc

/************************************************************************
*Copyright(C) 2015 by qsgy
 *All rights reserved. 
 *FileName:     $safeitemname$
 *Author:       oyh
 *Version:      
 *UnityVersion：
 *Date:   $time$      
 *Description:    
 *History: 
************************************************************************/
#endregion

using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
/// <summary>
/// entity死亡后掉落物体
/// </summary>
public class Relic : OnEntityDeath
{
    [SerializeField, Tooltip("死亡后掉落的道具")]
    public GameObject RelicGameObj;
    

    public override void OnDeath()
    {
        Vector3 RelicPosition = transform.position;
        RelicPosition.z = 0;
        if(RelicGameObj!=null)
            GameObject.Instantiate(RelicGameObj,RelicPosition, transform.rotation);
        else 
            Debug.Log("遗物物件未赋值！");
    }



}
